﻿@model ConferenceMenuModel
@{
	ViewBag.Title = Resources.ConferenceMenu + ConstValues.strDash + ViewBag.ConferenceName;
}
<div id="menuBar" style="height:35px;">
	<div style="float: left; padding: 5px 5px; font-weight: bold; text-align: left;">
		@Resources.MenuName：<input id="selMenuName" class="easyui-textbox" style="height:27px; width:200px" />&nbsp;&nbsp;
		<a href="javascript:void(0);" class="easyui-linkbutton" iconcls="icon-search" onclick="searchData();">@Resources.Search</a>&nbsp;&nbsp;
		@if ((User as ICISPrincipal).IsSSA || (User as ICISPrincipal).CSAList.Contains(Model.ConferenceId) || Utility.HasConferenceRole((User as ICISPrincipal), Model.ConferenceId, ConstValues.FunctionId.ConferenceMenu, RoleType.添加))
		{
			<a href="javascript:void(0);" class="easyui-linkbutton" iconcls="icon-add" onclick="addData();" plain="true">@Resources.Create</a>
		}
	</div>
	<div class="clear"></div>
</div>
<div id="dataGrid"></div>

@section bodyParts {
<div id="detailWindow" class="easyui-window"
	title="@Resources.ConferenceMenu" data-options="closed:true,minimizable:false,iconCls:'icon-save'"
	style="width:1200px; display:none;">
	<div class="main">
		<div class="box clearfix">
			<h3 id="detailWindowTitle" class="tit01">@Resources.Create</h3>>
			<form id="frmDetail" method="post" enctype="multipart/form-data">
				@Html.AntiForgeryToken()
				<table width="100%" height="100%" id="tblDetail" cellpadding="0" cellspacing="1" border="0" class="tastyle01">
					<tr>
						<td style="text-align: right;" class="w1 c1">@Resources.ConferenceName：</td>
						<td style="text-align: left;" class="w2 c2">
							<input type="hidden" id="hidID" name="Id" />
							<input type="hidden" id="hidConferenceId" name="conferenceId" />
							<input id="txtConferenceName" disabled class="easyui-textbox" style="height:27px; width:300px;" value="@ViewBag.ConferenceName">
						</td>
						<td style="text-align: right;" class="w1 c1">@Resources.MenuName：</td>
						<td style="text-align: left;" class="w2 c2">
							<input id="txtMenuName" name="menuName" class="easyui-textbox" style="height:27px; width:300px;" data-options="required:true,validType:['length[1,100]']">
						</td>
					</tr>
					<tr>
						<td style="text-align: right;" class="w1 c3">@Resources.Link：</td>
						<td style="text-align: left;" class="w2 c4">
							<input id="txtLink" name="link" class="easyui-textbox" style="height:27px; width:300px;" data-options="prompt:'@Resources.Example http://www.htcis.net',validType:['length[1,100]']">
						</td>
						<td style="text-align: right;" class="w1 c3">@Resources.Status：</td>
						<td style="text-align: left;" class="w2 c4">
							<select id="ddlStatus" name="status" class="easyui-combobox" style="height:27px; width:300px;" data-options="editable:false,required:true,panelHeight:'auto'">
								<option value="@ConstValues.Status.正常">@Resources.Normal</option>
								<option value="@ConstValues.Status.暂停">@Resources.Pause</option>
							</select>
						</td>
					</tr>
					<tr>
						<td style="text-align: right;" class="w1 c1">@Resources.Sort：</td>
						<td style="text-align: left;" class="w2 c2">
							<input id="txtSort" name="sort" class="easyui-numberbox" style="height:27px; width:300px;" />
						</td>
						<td style="text-align: right;" class="w1 c1"></td>
						<td style="text-align: left;" class="w2 c2"></td>
					</tr>
					<tr>
						<td style="text-align: right;" class="w1 c3">@Resources.Remark：</td>
						<td style="text-align: left;" class="w2 c4" colspan="3">
							<input id="txtRemark" name="remark" class="easyui-textbox" style="height:50px; width:892px;" data-options="multiline:true,validType:['length[1,1000]']" />
						</td>
					</tr>
				</table>
			</form>
			<div class="btnDiv">
				<input type="hidden" id="hdnWindowType" />
				<input type="button" class="gbtn" onclick="saveData();" value="@Resources.Save" />&nbsp;&nbsp;
				<input type="button" class="rbtn" onclick="$('#detailWindow').window('close');" value="@Resources.Cancel" />
			</div>
		</div>
	</div>
</div>
<div id="secondMenuWindow" class="easyui-window"
	title="@Resources.ConferenceMenu" data-options="closed:true,minimizable:false,maximizable:false,iconCls:'icon-save'"
	style="width:1200px; display:none;">
	<div class="main">
		<div class="box clearfix">
			<h3 id="secondMenuWindowTitle" class="tit01">@Resources.Create</h3>
			<form id="secondMenuDetail" method="post" enctype="multipart/form-data">
				@Html.AntiForgeryToken()
				<div id="secondGrid"></div>
				<table width="100%" height="100%" id="secondMenuJudge" cellpadding="0" cellspacing="1" border="0" class="tastyle01">
					<tr>
						<td style="text-align: right;" class="w1 c1">@Resources.ParentMenuName：</td>
						<td style="text-align: left;" class="w2 c2">
							<input type="hidden" id="hidSecConferenceId" name="secConferenceId" />
							<input type="hidden" id="hidParentMenuId" name="ParentMenuId" />
							<input type="hidden" id="secondId" name="secondId" />
							<input id="txtParentMenuName" name="parentMenuName" disabled class="easyui-textbox" style="height:27px; width:300px;">
						</td>
						<td style="text-align: right;" class="w1 c1">@Resources.MenuName：</td>
						<td style="text-align: left;" class="w2 c2">
							<input id="txtSecondMenuName" name="secondMenuName" class="easyui-textbox" style="height:27px; width:300px;" data-options="required:true,validType:['length[1,100]']">
						</td>
					</tr>
					<tr>
						<td style="text-align: right;" class="w1 c3">@Resources.Link：</td>
						<td style="text-align: left;" class="w2 c4">
							<input id="txtSecondLink" name="secondLink" class="easyui-textbox" style="height:27px; width:300px;" data-options="prompt:'@Resources.Example http://www.htcis.net',validType:['length[1,100]']">
						</td>
						<td style="text-align: right;" class="w1 c3">@Resources.Status：</td>
						<td style="text-align: left;" class="w2 c4">
							<select id="ddlSecondStatus" name="secondStatus" class="easyui-combobox" style="height:27px; width:300px;" data-options="editable:false,required:true,panelHeight:'auto'">
								<option value="@ConstValues.Status.正常">@Resources.Normal</option>
								<option value="@ConstValues.Status.暂停">@Resources.Pause</option>
							</select>
						</td>
					</tr>
					<tr>
						<td style="text-align: right;" class="w1 c1">@Resources.Sort：</td>
						<td style="text-align: left;" class="w2 c2">
							<input id="txtSecondSort" name="secondSort" class="easyui-numberbox" style="height:27px; width:300px;" />
						</td>
						<td style="text-align: right;" class="w1 c1"></td>
						<td style="text-align: left;" class="w2 c2"></td>
					</tr>
					<tr>
						<td style="text-align: right;" class="w1 c3">@Resources.Remark：</td>
						<td style="text-align: left;" class="w2 c4" colspan="3">
							<input id="txtSecondRemark" name="secondRemark" class="easyui-textbox" style="height:50px; width:892px;" data-options="multiline:true,validType:['length[1,100]']" />
						</td>
					</tr>
				</table>
			</form>
			<div class="btnDiv">
				<input type="hidden" id="hdnSecondWindowType" />
				<input type="button" class="gbtn" onclick="saveSecondData();" value="@Resources.Save" />&nbsp;&nbsp;
				<input type="button" class="rbtn" onclick="$('#secondMenuWindow').window('close');" value="@Resources.Cancel" />
			</div>
		</div>
	</div>
</div>
}

@section Scripts {
<script>
	common.setCurrentMenu("ConferenceMenu");
	common.setCurrentParentMenu("#menu_a5");

	$(function () {
		$("#hidConferenceId").val("@Model.ConferenceId");
		$("#selMenuName").textbox("textbox").bind("keydown", function (e) {
			if (e.keyCode == 13) {
				searchData()
			}
		});

		$("#dataGrid").datagrid({
			url: "@Url.Action(nameof(ConferenceMenuController.GetData),
					nameof(ConferenceMenuController).GetControllerName(),new { ConferenceId = Model.ConferenceId })",
			method: "get",
			singleSelect: true,
			fitColumns: true,
			width: $(window).width() - 285,
			height: $(window).height() - 158,
			nowrap: false,
			pagination: true,
			pageSize: @ConstValues.DefaultGridRows,
			striped: true,
			toolbar: "#toolBar",
			pageSize: 100, 
			pageList: [100, 200, 300, 400, 500],
			columns: [[
				{ field: "id", hidden: true },
				@if ((User as ICISPrincipal).IsSSA || (User as ICISPrincipal).CSAList.Contains(Model.ConferenceId) ||
					Utility.HasConferenceRole((User as ICISPrincipal), Model.ConferenceId, ConstValues.FunctionId.ConferenceMenu, RoleType.修改) ||
					Utility.HasConferenceRole((User as ICISPrincipal), Model.ConferenceId, ConstValues.FunctionId.ConferenceMenu, RoleType.删除))
				{
					<text>
					{
						field: "operate", title: "@Resources.Operate", align: "center", width: 300,
						formatter: function(value, rec) {
					    		var strInfo = "";
							var tmp = rec.menuName == null ? "" : rec.menuName.replace(new RegExp("'",'g'),"’").replace(new RegExp('"','g'),"“");
					    		@if ((User as ICISPrincipal).IsSSA || (User as ICISPrincipal).CSAList.Contains(Model.ConferenceId) || Utility.HasConferenceRole((User as ICISPrincipal), Model.ConferenceId, ConstValues.FunctionId.ConferenceMenu, RoleType.修改))
							{
								<text>
					    			strInfo += "<a href='#' style='color:#FF8C00;font-weight:bold;text-decoration:underline;' onclick='secondMenu(\""
										+ rec.id + "\",\"" + tmp + "\")'>@Resources.SecondMenu</a>&nbsp;|&nbsp;"
										+ "<a href='#' style='color:#66CDAA;font-weight:bold;text-decoration:underline;' onclick='editData(\""
										+ rec.id + "\")'>@Resources.Modify</a>";
					    			</text>
							}
					    		@if ((User as ICISPrincipal).IsSSA || (User as ICISPrincipal).CSAList.Contains(Model.ConferenceId) || Utility.HasConferenceRole((User as ICISPrincipal), Model.ConferenceId, ConstValues.FunctionId.ConferenceMenu, RoleType.删除))
							{
								<text>
					    			if (strInfo != "") {
					    				strInfo += "&nbsp;|&nbsp;";
					    			}
					    			strInfo += "<a href='#' style='color:#DC143C;font-weight:bold;text-decoration:underline;' onclick='deleteData(\""
									+ rec.id + "\",\""+ tmp+ "\")'>@Resources.Delete</a>";
					    			</text>
							}
					    		return strInfo;
						}
					},
					</text>
				}
				{ field: "menuName", title: "@Resources.MenuName", align: "center", sortable: true, width: 150 },
				{
					field: "link", title: "@Resources.Link", align: "center", sortable: true, width: 300,
					formatter: function(value, rec) {
						if (rec.status == "@ConstValues.Status.正常") {
							if (value==null) {
								return "@ConstValues.strHyphen@ConstValues.strHyphen"
							} else {
								var conStr = ""
								conStr += "<a href='" + value + "' style='color:#1874CD;text-decoration:underline;' target='_blank'>" + value + "</a>  ";
								return conStr;
							}
						} else {
							return value;
						}
					}
				},
				{
					field: "status", title: "@Resources.Status", align: "center", sortable: true, width: 150,
					formatter: function(value, rec) {
						if (value=="@ConstValues.Status.正常") {
							return "@Resources.Normal"
						} else {
							return "@Resources.Pause"
						}
					}
				},
				{ field: "sort", title: "@Resources.Sort", align: "center", sortable: true, width: 100 },
				{ field: "remark", title: "@Resources.Remark", align: "center", sortable: true, width: 200 },
				{ field: "creator", title: "@Resources.Creator", align: "center", sortable: true, width: 100 },
				{ field: "createIP", title: "@Resources.CreateIP", align: "center", sortable: true, width: 150 },
				{ field: "createDate", title: "@Resources.CreateDate", align: "center", sortable: true, width: 150 },
			]],
			onBeforeLoad: function(param) {
				param.random = Math.random();
				param.conferenceId = $("#hidConferenceId").val();
			}
		});

		$(window).resize(function () {
			$("#dataGrid").datagrid("resize", {
				width: $(window).width() - 285,
				height: $(window).height() - 110
			});
		});

		$("#detailWindow").window({
			onOpen: function () {
				$(this).scrollTop(0);
			},
			top: ($(window).height() - 600) * 0.5
		});

		$("#secondMenuWindow").window({
			onOpen: function () {
				$(this).scrollTop(0);
			},
			top: ($(window).height() - 600) * 0.5
		});
	});

	function deleteSecondData(id, mailServer) {
		var confirmMessage = "@Resources.CfmDelete";
		confirmMessage = confirmMessage.replace(/\{0\}/g, mailServer);
		$.messager.confirm("@Resources.Delete", confirmMessage, function (r) {
			if (r) {
				$("#hidID").val(id);
				$.post("@Url.Action(nameof(ConferenceMenuController.DeleteSecondData),
						nameof(ConferenceMenuController).GetControllerName(),new { ConferenceId = Model.ConferenceId })",
					$("#frmDetail").serialize(),
					function(data, textStatus, jqXHR) {
						if (data.result == "@ConstValues.AjaxFailResult") {
			    				common.showError(data.message);
						} else {
			    				common.showSuccess(data.message, true);
			    				$("#secondGrid").datagrid("reload");
			    				initSecondMenuForm();
						}
					}
				);
			}
		});
	};

	function deleteData(id,mailServer) {
		var confirmMessage = "@Resources.CfmDelete";
		confirmMessage = confirmMessage.replace(/\{0\}/g, mailServer);
		$.messager.confirm("@Resources.Delete", confirmMessage, function (r) {
			if (r) {
				$("#hidID").val(id);
				$.post("@Url.Action(nameof(ConferenceMenuController.Delete), nameof(ConferenceMenuController).GetControllerName(),new { ConferenceId = Model.ConferenceId })"
					, $("#frmDetail").serialize()
					, function(data, textStatus, jqXHR) {
					if (data.result == "@ConstValues.AjaxFailResult") {
					    	common.showError(data.message);
					}
					else
					{
					    	common.showSuccess(data.message, true);
					    	$("#dataGrid").datagrid("reload");
					}
					});
			}
		});
	};

	function addData() {
		$("#hdnWindowType").val("add");
		$("#detailWindowTitle").text("@Resources.Create");
		$("#txtSort").numberbox("setValue", @ConstValues.DefaultSort);
		$("#txtMenuName").textbox("setValue","");
		$("#txtLink").textbox("setValue","");
		$("#txtRemark").textbox("setValue","");
		$("#detailWindow").window("open");
	}


	function editData(id) {
		var url = "@Url.Action(nameof(ConferenceMenuController.GetEditData),nameof(ConferenceMenuController).GetControllerName())" + "/" + id;
		$.get(url, null, function (data, textStatus, jqXHR) {
			if (data.result == "@ConstValues.AjaxFailResult") {
				common.showError(data.message);
				$("#dataGrid").datagrid("reload");
			} else {
				$("#txtMenuName").textbox("setValue",data.data.menuName);
				$("#txtLink").textbox("setValue",data.data.link);
				$("#ddlStatus").combobox("setValue",data.data.status);
				$("#txtSort").numberbox("setValue", data.data.sort);
				$("#txtRemark").textbox("setValue",data.data.remark);
				$("#hidID").val(id);
				$("#hdnWindowType").val("edit");
				$("#detailWindowTitle").text("@Resources.Modify");
				$("#detailWindow").window("open");
			}
		});
	}

	function saveData() {
		var isValid = $("#frmDetail").form("validate");

		if (isValid) {
			$.messager.confirm("@Resources.Save", "@Resources.CfmSave", function (r) {
				if (r) {
					var loading = layer.load(0,  {
						shade: [0.4,"#fff"]
					});
					switch ($("#hdnWindowType").val())
					{
						case "add":
							$.post("@Url.Action(nameof(ConferenceMenuController.Create),nameof(ConferenceMenuController).GetControllerName(),new { ConferenceId = Model.ConferenceId })",
							$("#frmDetail").serialize(),
							function(data, textStatus, jqXHR) {
								layer.close(loading);
								if (data.result == "@ConstValues.AjaxFailResult") {
									common.showError(data.message);
								}
								else {
									common.showSuccess(data.message, true);
									$("#detailWindow").window("close");
									$("#dataGrid").datagrid("reload");
								}
							}
							);
							break;
						case "edit":
							$.post("@Url.Action(nameof(ConferenceMenuController.Modify),nameof(ConferenceMenuController).GetControllerName(),new { ConferenceId = Model.ConferenceId })",
							$("#frmDetail").serialize(),
							function(data, textStatus, jqXHR) {
								layer.close(loading);
								if (data.result == "@ConstValues.AjaxFailResult") {
									common.showError(data.message);
								}
								else {
									common.showSuccess(data.message, true);
									$("#detailWindow").window("close");
									$("#dataGrid").datagrid("reload");
								}
							}
							);
							break;
					}
				}
			})
		}
	};
	function saveSecondData() {
		var isValid = $("#secondMenuDetail").form("validate");

		if (isValid) {
			$.messager.confirm("@Resources.Save", "@Resources.CfmSave", function (r) {
				if (r) {
					var loading = layer.load(0,  {
						shade: [0.4,"#fff"]
					});
					switch ($("#hdnSecondWindowType").val())
					{
						case "add":
							$.post("@Url.Action(nameof(ConferenceMenuController.CreateSecondData),
									nameof(ConferenceMenuController).GetControllerName(),new { ConferenceId = Model.ConferenceId })",
								$("#secondMenuDetail").serialize(),
								function(data, textStatus, jqXHR) {
									layer.close(loading);
									if (data.result == "@ConstValues.AjaxFailResult") {
										common.showError(data.message);
									} else {
										common.showSuccess(data.message, true);
										$("#txtSecondSort").numberbox("setValue", @ConstValues.DefaultSort);
										$("#txtSecondMenuName").textbox("setValue","");
										$("#txtSecondLink").textbox("setValue","");
										$("#txtSecondRemark").textbox("setValue","");
										$("#hdnSecondWindowType").val("add");
										$("#secondGrid").datagrid("reload");
									}
								}
							);
							break;
						case "edit":
							$.post("@Url.Action(nameof(ConferenceMenuController.ModifySecondData),
									nameof(ConferenceMenuController).GetControllerName(),new { ConferenceId = Model.ConferenceId })",
								$("#secondMenuDetail").serialize(),
								function(data, textStatus, jqXHR) {
									layer.close(loading);
									if (data.result == "@ConstValues.AjaxFailResult") {
										common.showError(data.message);
									} else {
										common.showSuccess(data.message, true);
										$("#txtSecondSort").numberbox("setValue", @ConstValues.DefaultSort);
										$("#txtSecondMenuName").textbox("setValue","");
										$("#txtSecondLink").textbox("setValue","");
										$("#txtSecondRemark").textbox("setValue","");
										$("#hdnSecondWindowType").val("add");
										$("#secondGrid").datagrid("reload");
									}
								}
							);
							break;
							
					}
				}
			})
		}
	};

	function searchData() {
		$("#dataGrid").datagrid("load", {
			selMenuName: $("#selMenuName").textbox("getValue"),
		});
	}

	function secondMenu(id,menuName) {
		$("#hidParentMenuId").val(id);
		$("#hidSecConferenceId").val("@Model.ConferenceId");
		$("#txtParentMenuName").textbox("setValue",menuName);
		$("#hdnSecondWindowType").val("add");
		$("#txtSecondSort").numberbox("setValue", @ConstValues.DefaultSort);
		$("#txtSecondMenuName").textbox("setValue","");
		$("#txtSecondLink").textbox("setValue","");
		$("#txtSecondRemark").textbox("setValue","");

		$("#secondGrid").datagrid({
			url: "@Url.Action(nameof(ConferenceMenuController.GetSecondData),
					nameof(ConferenceMenuController).GetControllerName())"+"?id="+id,
			method: "get",
			checkOnSelect: false,
			selectOnCheck: false,
			height:228,
			nowrap: false,
			pageSize: @ConstValues.DefaultGridRows,
			striped: true,
			singleSelect: true,
			singleCheck: true,
			frozenColumns: [[
				{ field: "id", hidden: true },
				{ field: "chk", align: "center", checkbox: true },
				{
					field: "operate", title: "@Resources.Operate", align: "center", width: 150,
					formatter: function(value, rec,rowIndex) {
			    			var strInfo = "";
						var tmp = rec.menuName == null ? "" : rec.menuName.replace(new RegExp("'",'g'),"’").replace(new RegExp('"','g'),"“");
						strInfo += "<a href='#' style='color:#FF8C00;font-weight:bold;text-decoration:underline;' onclick='editSecondMenu(\""
										+ rec.id + "\",\""+ rowIndex + "\")'>@Resources.Modify</a>&nbsp;|&nbsp;"									
			    			strInfo += "<a href='#' style='color:#DC143C;font-weight:bold;text-decoration:underline;' onclick='deleteSecondData(\""
							+ rec.id + "\",\"" + tmp + "\")'>@Resources.Delete</a>";
			    			return strInfo;
					}
				},
				{ field: "menuName", title: "@Resources.MenuName", align: "center",  width: 150 },
			]],
			columns: [[
				{ field: "parentId", title: "@Resources.ParentMenuName", align: "center",  width: 150 },
				{
					field: "link", title: "@Resources.Link", align: "center",  width: 200 ,
					formatter: function(value, rec) {
						if (value==null) {
							return "@ConstValues.strHyphen@ConstValues.strHyphen"
						} else {
							var conStr = ""
							conStr += "<a href='" + value + "' style='color:#1874CD;text-decoration:underline;' target='_blank'>" + value + "</a>  ";
							return conStr;
						}
					}
				},
				{
					field: "status", title: "@Resources.Status", align: "center",   width: 150 ,
					formatter: function(value, rec) {
						if (value=="@ConstValues.Status.正常") {
							return "@Resources.Normal"
						} else {
							return "@Resources.Pause"
						}
					}
				},
				{ field: "sort", title: "@Resources.Sort", align: "center", sortable: true, width: 100},
				{ field: "remark", title: "@Resources.Remark", align: "center",   width: 200 },
				{ field: "creator", title: "@Resources.Creator", align: "center",   width: 100 },
				{ field: "createIP", title: "@Resources.CreateIP", align: "center",   width: 150 },
				{ field: "createDate", title: "@Resources.CreateDate", align: "center",   width: 150 },
			]],
			onBeforeLoad: function(param) {
				param.random = Math.random();
				param.conferenceId = $("#hidConferenceId").val();
			},
			onLoadSuccess: function(){
				$("#secondGrid").parent().find("div .datagrid-header-check").children("input[type=\"checkbox\"]").eq(0).attr("style", "display:none;");
			},
			onCheck: function (rowIndex, rowData) {
				editSecondMenu(rowData.id, rowIndex);
			},
			onUncheck: function (rowIndex, rowData) {
				initSecondMenuForm();
			},

		});
		$("#secondMenuWindowTitle").text("@Resources.SecondMenu");
		$("#secondMenuWindow").window("open");
	}

	function initSecondMenuForm() {
		$("#txtSecondSort").numberbox("setValue", @ConstValues.DefaultSort);
		$("#txtSecondMenuName").textbox("setValue","");
		$("#txtSecondLink").textbox("setValue","");
		$("#txtSecondRemark").textbox("setValue","");
		$("#ddlSecondStatus").combobox("setValue","@ConstValues.Status.正常"),
		$("#hdnSecondWindowType").val("add");
	}

	function editSecondMenu(id, rowIndex) {
		$("input[name=chk]").attr("checked",false)
		$("input[type='checkbox']").eq(parseInt(rowIndex)+1).prop("checked", true);
		$("#secondId").val(id)

		var url = "@Url.Action(nameof(ConferenceMenuController.GetEditData),
				nameof(ConferenceMenuController).GetControllerName())" + "/" + id;
		$.get(url, null, function (data, textStatus, jqXHR) {
			if (data.result == "@ConstValues.AjaxFailResult") {
				common.showError(data.message);
				$("#dataGrid").datagrid("reload");
			} else {
				$("#txtSecondMenuName").textbox("setValue",data.data.menuName);
				$("#txtSecondLink").textbox("setValue",data.data.link);
				$("#ddlSecondStatus").combobox("setValue",data.data.status);
				$("#txtSecondSort").numberbox("setValue", data.data.sort);
				$("#txtSecondRemark").textbox("setValue",data.data.remark);
				$("#hdnSecondWindowType").val("edit");
			}
		});
	}
</script>
}